3.495 \(\int (e \sec (c+d x))^{2-2 n} (a+i a \tan (c+d x))^n \, dx\)

Optimal. Leaf size=46 \[ \frac{i a (a+i a \tan (c+d x))^{n-1} (e \sec (c+d x))^{2-2 n}}{d (1-n)} \]

[Out]

(I*a*(e*Sec[c + d*x])^(2 - 2*n)*(a + I*a*Tan[c + d*x])^(-1 + n))/(d*(1 - n))

________________________________________________________________________________________

Rubi [A]  time = 0.0563509, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.033, Rules used = {3493} \[ \frac{i a (a+i a \tan (c+d x))^{n-1} (e \sec (c+d x))^{2-2 n}}{d (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[(e*Sec[c + d*x])^(2 - 2*n)*(a + I*a*Tan[c + d*x])^n,x]

[Out]

(I*a*(e*Sec[c + d*x])^(2 - 2*n)*(a + I*a*Tan[c + d*x])^(-1 + n))/(d*(1 - n))

Rule 3493

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(2*b*
(d*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1))/(f*m), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2
, 0] && EqQ[Simplify[m/2 + n - 1], 0]

Rubi steps

\begin{align*} \int (e \sec (c+d x))^{2-2 n} (a+i a \tan (c+d x))^n \, dx &=\frac{i a (e \sec (c+d x))^{2-2 n} (a+i a \tan (c+d x))^{-1+n}}{d (1-n)}\\ \end{align*}

Mathematica [A]  time = 0.603248, size = 59, normalized size = 1.28 \[ -\frac{e^2 (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-2 n} (\sec (c) \sin (d x) \sec (c+d x)+\tan (c)+i)}{d (n-1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*Sec[c + d*x])^(2 - 2*n)*(a + I*a*Tan[c + d*x])^n,x]

[Out]

-((e^2*(I + Sec[c]*Sec[c + d*x]*Sin[d*x] + Tan[c])*(a + I*a*Tan[c + d*x])^n)/(d*(-1 + n)*(e*Sec[c + d*x])^(2*n
)))

________________________________________________________________________________________

Maple [F]  time = 0.782, size = 0, normalized size = 0. \begin{align*} \int \left ( e\sec \left ( dx+c \right ) \right ) ^{2-2\,n} \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*sec(d*x+c))^(2-2*n)*(a+I*a*tan(d*x+c))^n,x)

[Out]

int((e*sec(d*x+c))^(2-2*n)*(a+I*a*tan(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [B]  time = 2.26599, size = 293, normalized size = 6.37 \begin{align*} \frac{{\left (-i \, a^{n} e^{2} - \frac{2 \, a^{n} e^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{i \, a^{n} e^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} e^{\left (n \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right ) + n \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right ) + n \log \left (-\frac{2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right ) - 2 \, n \log \left (-\frac{\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )\right )}}{{\left (e^{2 \, n}{\left (n - 1\right )} - \frac{e^{2 \, n}{\left (n - 1\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))^(2-2*n)*(a+I*a*tan(d*x+c))^n,x, algorithm="maxima")

[Out]

(-I*a^n*e^2 - 2*a^n*e^2*sin(d*x + c)/(cos(d*x + c) + 1) + I*a^n*e^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*e^(n*
log(sin(d*x + c)/(cos(d*x + c) + 1) + 1) + n*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1) + n*log(-2*I*sin(d*x + c
)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1) - 2*n*log(-sin(d*x + c)^2/(cos(d*x + c) + 1)^2
 - 1))/((e^(2*n)*(n - 1) - e^(2*n)*(n - 1)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*d)

________________________________________________________________________________________

Fricas [B]  time = 1.88639, size = 240, normalized size = 5.22 \begin{align*} \frac{\left (\frac{2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n} \left (\frac{2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{-2 \, n + 2}{\left (-i \, e^{\left (2 i \, d x + 2 i \, c\right )} - i\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{2 \,{\left (d n - d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))^(2-2*n)*(a+I*a*tan(d*x+c))^n,x, algorithm="fricas")

[Out]

1/2*(2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^n*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1))^(-2*
n + 2)*(-I*e^(2*I*d*x + 2*I*c) - I)*e^(-2*I*d*x - 2*I*c)/(d*n - d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))**(2-2*n)*(a+I*a*tan(d*x+c))**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (e \sec \left (d x + c\right )\right )^{-2 \, n + 2}{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))^(2-2*n)*(a+I*a*tan(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((e*sec(d*x + c))^(-2*n + 2)*(I*a*tan(d*x + c) + a)^n, x)